package com.ztesoft.web.baseconfig.db.arg;

import java.util.*;
import java.math.*;
import org.apache.commons.lang.*;

public class DmTableRelArg {
    private String pk_name = "SUB_DATA_ID";

    private String orderByClause;

    private String groupByClause;

    private String columns;

    private String countsql1;

    private String countsql2;

    private boolean distinct;

    private int rowStart = 0;

    private int rowEnd = 10;

    private List<DmTableRelCriteria> oredCriteria;

    public DmTableRelArg() {
        oredCriteria = new ArrayList<DmTableRelCriteria>();
    }

    public void setPk_name(String pk_name) {
        this.pk_name = StringEscapeUtils.escapeSql(pk_name);
    }

    public String getPk_name() {
        return pk_name;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = StringEscapeUtils.escapeSql(orderByClause);
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setGroupByClause(String groupByClause) {
        this.groupByClause = StringEscapeUtils.escapeSql(groupByClause);
    }

    public String geGroupByClause() {
        return groupByClause;
    }

    public void setColumns(String columns) {
        this.columns = StringEscapeUtils.escapeSql(columns);
    }

    public String geColumns() {
        return columns;
    }

    public void setCountsql1(String countsql1) {
        this.countsql1 = StringEscapeUtils.escapeSql(countsql1);
    }

    public String geCountsql1() {
        return countsql1;
    }

    public void setCountsql2(String countsql2) {
        this.countsql2 = StringEscapeUtils.escapeSql(countsql2);
    }

    public String geCountsql2() {
        return countsql2;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setRowStart(int rowStart) {
        this.rowStart = rowStart;
    }

    public void setRowEnd(int rowEnd) {
        this.rowEnd = rowEnd;
    }

    public int getRowStart() {
        return rowStart;
    }

    public int getRowEnd() {
        return rowEnd;
    }

    public List<DmTableRelCriteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(DmTableRelCriteria criteria) {
        oredCriteria.add(criteria);
    }

    public DmTableRelCriteria or() {
    	DmTableRelCriteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public DmTableRelCriteria createCriteria() {
    	DmTableRelCriteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected DmTableRelCriteria createCriteriaInternal() {
    	DmTableRelCriteria criteria = new DmTableRelCriteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        groupByClause = null;
        columns = null;
        countsql1 = null;
        countsql2 = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<DmTableRelCriterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<DmTableRelCriterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<DmTableRelCriterion> getAllCriteria() {
            return criteria;
        }

        public List<DmTableRelCriterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new DmTableRelCriterion(condition));
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new DmTableRelCriterion(condition, value));
        }

        protected void addCriterion(String condition, Object value,
                String property, int likeType) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new DmTableRelCriterion(condition, value, likeType));
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            criteria.add(new DmTableRelCriterion(condition, value1, value2));
        }

        public DmTableRelCriteria andCriterionEqualTo(String criterion) {
            if (StringUtils.isBlank(criterion)) {
                criterion = "1=1";
            }
            addCriterion(criterion);
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andSubDataIdIsNull() {
            addCriterion("SUB_DATA_ID is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdIsNotNull() {
            addCriterion("SUB_DATA_ID is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdEqualTo(Integer value) {
            addCriterion("SUB_DATA_ID =", value, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdNotEqualTo(Integer value) {
            addCriterion("SUB_DATA_ID <>", value, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdGreaterThan(Integer value) {
            addCriterion("SUB_DATA_ID >", value, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("SUB_DATA_ID >=", value, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdLessThan(Integer value) {
            addCriterion("SUB_DATA_ID <", value, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdLessThanOrEqualTo(Integer value) {
            addCriterion("SUB_DATA_ID <=", value, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdLike(Integer value) {
            addCriterion("SUB_DATA_ID like ", value, "SUB_DATA_ID", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdNotLike(Integer value) {
            addCriterion("SUB_DATA_ID  not like ", value, "SUB_DATA_ID", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdLeftLike(Integer value) {
            addCriterion("SUB_DATA_ID like ", value, "SUB_DATA_ID", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdNotLeftLike(Integer value) {
            addCriterion("SUB_DATA_ID  not like ", value, "SUB_DATA_ID", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdRightLike(Integer value) {
            addCriterion("SUB_DATA_ID like ", value, "SUB_DATA_ID", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdNotRightLike(Integer value) {
            addCriterion("SUB_DATA_ID  not like ", value, "SUB_DATA_ID", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdIn(List<Integer> values) {
            addCriterion("SUB_DATA_ID  in ", values, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdNotIn(List<Integer> values) {
            addCriterion("SUB_DATA_ID not in ", values, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdBetween(Integer value1, Integer value2) {
            addCriterion("SUB_DATA_ID between ", value1, value2, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubDataIdNotBetween(Integer value1, Integer value2) {
            addCriterion("SUB_DATA_ID not between ", value1, value2, "SUB_DATA_ID");
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andSeqNbrIsNull() {
            addCriterion("SEQ_NBR is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrIsNotNull() {
            addCriterion("SEQ_NBR is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrEqualTo(Integer value) {
            addCriterion("SEQ_NBR =", value, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrNotEqualTo(Integer value) {
            addCriterion("SEQ_NBR <>", value, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrGreaterThan(Integer value) {
            addCriterion("SEQ_NBR >", value, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrGreaterThanOrEqualTo(Integer value) {
            addCriterion("SEQ_NBR >=", value, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrLessThan(Integer value) {
            addCriterion("SEQ_NBR <", value, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrLessThanOrEqualTo(Integer value) {
            addCriterion("SEQ_NBR <=", value, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrLike(Integer value) {
            addCriterion("SEQ_NBR like ", value, "SEQ_NBR", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrNotLike(Integer value) {
            addCriterion("SEQ_NBR  not like ", value, "SEQ_NBR", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrLeftLike(Integer value) {
            addCriterion("SEQ_NBR like ", value, "SEQ_NBR", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrNotLeftLike(Integer value) {
            addCriterion("SEQ_NBR  not like ", value, "SEQ_NBR", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrRightLike(Integer value) {
            addCriterion("SEQ_NBR like ", value, "SEQ_NBR", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrNotRightLike(Integer value) {
            addCriterion("SEQ_NBR  not like ", value, "SEQ_NBR", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrIn(List<Integer> values) {
            addCriterion("SEQ_NBR  in ", values, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrNotIn(List<Integer> values) {
            addCriterion("SEQ_NBR not in ", values, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrBetween(Integer value1, Integer value2) {
            addCriterion("SEQ_NBR between ", value1, value2, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSeqNbrNotBetween(Integer value1, Integer value2) {
            addCriterion("SEQ_NBR not between ", value1, value2, "SEQ_NBR");
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andRelDataIdIsNull() {
            addCriterion("REL_DATA_ID is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdIsNotNull() {
            addCriterion("REL_DATA_ID is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdEqualTo(Integer value) {
            addCriterion("REL_DATA_ID =", value, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdNotEqualTo(Integer value) {
            addCriterion("REL_DATA_ID <>", value, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdGreaterThan(Integer value) {
            addCriterion("REL_DATA_ID >", value, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("REL_DATA_ID >=", value, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdLessThan(Integer value) {
            addCriterion("REL_DATA_ID <", value, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdLessThanOrEqualTo(Integer value) {
            addCriterion("REL_DATA_ID <=", value, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdLike(Integer value) {
            addCriterion("REL_DATA_ID like ", value, "REL_DATA_ID", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdNotLike(Integer value) {
            addCriterion("REL_DATA_ID  not like ", value, "REL_DATA_ID", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdLeftLike(Integer value) {
            addCriterion("REL_DATA_ID like ", value, "REL_DATA_ID", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdNotLeftLike(Integer value) {
            addCriterion("REL_DATA_ID  not like ", value, "REL_DATA_ID", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdRightLike(Integer value) {
            addCriterion("REL_DATA_ID like ", value, "REL_DATA_ID", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdNotRightLike(Integer value) {
            addCriterion("REL_DATA_ID  not like ", value, "REL_DATA_ID", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdIn(List<Integer> values) {
            addCriterion("REL_DATA_ID  in ", values, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdNotIn(List<Integer> values) {
            addCriterion("REL_DATA_ID not in ", values, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdBetween(Integer value1, Integer value2) {
            addCriterion("REL_DATA_ID between ", value1, value2, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelDataIdNotBetween(Integer value1, Integer value2) {
            addCriterion("REL_DATA_ID not between ", value1, value2, "REL_DATA_ID");
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andRelMapColsIsNull() {
            addCriterion("REL_MAP_COLS is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsIsNotNull() {
            addCriterion("REL_MAP_COLS is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsEqualTo(String value) {
            addCriterion("REL_MAP_COLS =", value, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsNotEqualTo(String value) {
            addCriterion("REL_MAP_COLS <>", value, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsGreaterThan(String value) {
            addCriterion("REL_MAP_COLS >", value, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsGreaterThanOrEqualTo(String value) {
            addCriterion("REL_MAP_COLS >=", value, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsLessThan(String value) {
            addCriterion("REL_MAP_COLS <", value, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsLessThanOrEqualTo(String value) {
            addCriterion("REL_MAP_COLS <=", value, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsLike(String value) {
            addCriterion("REL_MAP_COLS like ", value, "REL_MAP_COLS", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsNotLike(String value) {
            addCriterion("REL_MAP_COLS  not like ", value, "REL_MAP_COLS", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsLeftLike(String value) {
            addCriterion("REL_MAP_COLS like ", value, "REL_MAP_COLS", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsNotLeftLike(String value) {
            addCriterion("REL_MAP_COLS  not like ", value, "REL_MAP_COLS", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsRightLike(String value) {
            addCriterion("REL_MAP_COLS like ", value, "REL_MAP_COLS", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsNotRightLike(String value) {
            addCriterion("REL_MAP_COLS  not like ", value, "REL_MAP_COLS", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsIn(List<String> values) {
            addCriterion("REL_MAP_COLS  in ", values, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsNotIn(List<String> values) {
            addCriterion("REL_MAP_COLS not in ", values, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsBetween(String value1, String value2) {
            addCriterion("REL_MAP_COLS between ", value1, value2, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andRelMapColsNotBetween(String value1, String value2) {
            addCriterion("REL_MAP_COLS not between ", value1, value2, "REL_MAP_COLS");
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andSubMapColsIsNull() {
            addCriterion("SUB_MAP_COLS is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsIsNotNull() {
            addCriterion("SUB_MAP_COLS is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsEqualTo(String value) {
            addCriterion("SUB_MAP_COLS =", value, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsNotEqualTo(String value) {
            addCriterion("SUB_MAP_COLS <>", value, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsGreaterThan(String value) {
            addCriterion("SUB_MAP_COLS >", value, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsGreaterThanOrEqualTo(String value) {
            addCriterion("SUB_MAP_COLS >=", value, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsLessThan(String value) {
            addCriterion("SUB_MAP_COLS <", value, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsLessThanOrEqualTo(String value) {
            addCriterion("SUB_MAP_COLS <=", value, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsLike(String value) {
            addCriterion("SUB_MAP_COLS like ", value, "SUB_MAP_COLS", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsNotLike(String value) {
            addCriterion("SUB_MAP_COLS  not like ", value, "SUB_MAP_COLS", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsLeftLike(String value) {
            addCriterion("SUB_MAP_COLS like ", value, "SUB_MAP_COLS", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsNotLeftLike(String value) {
            addCriterion("SUB_MAP_COLS  not like ", value, "SUB_MAP_COLS", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsRightLike(String value) {
            addCriterion("SUB_MAP_COLS like ", value, "SUB_MAP_COLS", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsNotRightLike(String value) {
            addCriterion("SUB_MAP_COLS  not like ", value, "SUB_MAP_COLS", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsIn(List<String> values) {
            addCriterion("SUB_MAP_COLS  in ", values, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsNotIn(List<String> values) {
            addCriterion("SUB_MAP_COLS not in ", values, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsBetween(String value1, String value2) {
            addCriterion("SUB_MAP_COLS between ", value1, value2, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andSubMapColsNotBetween(String value1, String value2) {
            addCriterion("SUB_MAP_COLS not between ", value1, value2, "SUB_MAP_COLS");
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andStaffIdIsNull() {
            addCriterion("STAFF_ID is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdIsNotNull() {
            addCriterion("STAFF_ID is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdEqualTo(Integer value) {
            addCriterion("STAFF_ID =", value, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdNotEqualTo(Integer value) {
            addCriterion("STAFF_ID <>", value, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdGreaterThan(Integer value) {
            addCriterion("STAFF_ID >", value, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("STAFF_ID >=", value, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdLessThan(Integer value) {
            addCriterion("STAFF_ID <", value, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdLessThanOrEqualTo(Integer value) {
            addCriterion("STAFF_ID <=", value, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdLike(Integer value) {
            addCriterion("STAFF_ID like ", value, "STAFF_ID", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdNotLike(Integer value) {
            addCriterion("STAFF_ID  not like ", value, "STAFF_ID", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdLeftLike(Integer value) {
            addCriterion("STAFF_ID like ", value, "STAFF_ID", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdNotLeftLike(Integer value) {
            addCriterion("STAFF_ID  not like ", value, "STAFF_ID", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdRightLike(Integer value) {
            addCriterion("STAFF_ID like ", value, "STAFF_ID", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdNotRightLike(Integer value) {
            addCriterion("STAFF_ID  not like ", value, "STAFF_ID", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdIn(List<Integer> values) {
            addCriterion("STAFF_ID  in ", values, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdNotIn(List<Integer> values) {
            addCriterion("STAFF_ID not in ", values, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdBetween(Integer value1, Integer value2) {
            addCriterion("STAFF_ID between ", value1, value2, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStaffIdNotBetween(Integer value1, Integer value2) {
            addCriterion("STAFF_ID not between ", value1, value2, "STAFF_ID");
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andStateIsNull() {
            addCriterion("STATE is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateIsNotNull() {
            addCriterion("STATE is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateEqualTo(String value) {
            addCriterion("STATE =", value, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateNotEqualTo(String value) {
            addCriterion("STATE <>", value, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateGreaterThan(String value) {
            addCriterion("STATE >", value, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateGreaterThanOrEqualTo(String value) {
            addCriterion("STATE >=", value, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateLessThan(String value) {
            addCriterion("STATE <", value, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateLessThanOrEqualTo(String value) {
            addCriterion("STATE <=", value, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateLike(String value) {
            addCriterion("STATE like ", value, "STATE", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateNotLike(String value) {
            addCriterion("STATE  not like ", value, "STATE", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateLeftLike(String value) {
            addCriterion("STATE like ", value, "STATE", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateNotLeftLike(String value) {
            addCriterion("STATE  not like ", value, "STATE", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateRightLike(String value) {
            addCriterion("STATE like ", value, "STATE", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateNotRightLike(String value) {
            addCriterion("STATE  not like ", value, "STATE", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateIn(List<String> values) {
            addCriterion("STATE  in ", values, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateNotIn(List<String> values) {
            addCriterion("STATE not in ", values, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateBetween(String value1, String value2) {
            addCriterion("STATE between ", value1, value2, "STATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateNotBetween(String value1, String value2) {
            addCriterion("STATE not between ", value1, value2, "STATE");
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andStateDateIsNull() {
            addCriterion("STATE_DATE is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateIsNotNull() {
            addCriterion("STATE_DATE is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateEqualTo(String value) {
            addCriterion("STATE_DATE =", value, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateNotEqualTo(String value) {
            addCriterion("STATE_DATE <>", value, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateGreaterThan(String value) {
            addCriterion("STATE_DATE >", value, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateGreaterThanOrEqualTo(String value) {
            addCriterion("STATE_DATE >=", value, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateLessThan(String value) {
            addCriterion("STATE_DATE <", value, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateLessThanOrEqualTo(String value) {
            addCriterion("STATE_DATE <=", value, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateLike(String value) {
            addCriterion("STATE_DATE like ", value, "STATE_DATE", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateNotLike(String value) {
            addCriterion("STATE_DATE  not like ", value, "STATE_DATE", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateLeftLike(String value) {
            addCriterion("STATE_DATE like ", value, "STATE_DATE", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateNotLeftLike(String value) {
            addCriterion("STATE_DATE  not like ", value, "STATE_DATE", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateRightLike(String value) {
            addCriterion("STATE_DATE like ", value, "STATE_DATE", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateNotRightLike(String value) {
            addCriterion("STATE_DATE  not like ", value, "STATE_DATE", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateIn(List<String> values) {
            addCriterion("STATE_DATE  in ", values, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateNotIn(List<String> values) {
            addCriterion("STATE_DATE not in ", values, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateBetween(String value1, String value2) {
            addCriterion("STATE_DATE between ", value1, value2, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andStateDateNotBetween(String value1, String value2) {
            addCriterion("STATE_DATE not between ", value1, value2, "STATE_DATE");
            return (DmTableRelCriteria) this;
        }
        public DmTableRelCriteria andCreateDateIsNull() {
            addCriterion("CREATE_DATE is null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateIsNotNull() {
            addCriterion("CREATE_DATE is not null");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateEqualTo(String value) {
            addCriterion("CREATE_DATE =", value, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateNotEqualTo(String value) {
            addCriterion("CREATE_DATE <>", value, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateGreaterThan(String value) {
            addCriterion("CREATE_DATE >", value, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateGreaterThanOrEqualTo(String value) {
            addCriterion("CREATE_DATE >=", value, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateLessThan(String value) {
            addCriterion("CREATE_DATE <", value, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateLessThanOrEqualTo(String value) {
            addCriterion("CREATE_DATE <=", value, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateNotLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 1);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateLeftLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateNotLeftLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 0);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateRightLike(String value) {
            addCriterion("CREATE_DATE like ", value, "CREATE_DATE", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateNotRightLike(String value) {
            addCriterion("CREATE_DATE  not like ", value, "CREATE_DATE", 2);
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateIn(List<String> values) {
            addCriterion("CREATE_DATE  in ", values, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateNotIn(List<String> values) {
            addCriterion("CREATE_DATE not in ", values, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateBetween(String value1, String value2) {
            addCriterion("CREATE_DATE between ", value1, value2, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

        public DmTableRelCriteria andCreateDateNotBetween(String value1, String value2) {
            addCriterion("CREATE_DATE not between ", value1, value2, "CREATE_DATE");
            return (DmTableRelCriteria) this;
        }

    }

    public static class DmTableRelCriteria extends GeneratedCriteria {

        protected DmTableRelCriteria() {
            super();
        }
    }

    public static class DmTableRelCriterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected DmTableRelCriterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }
        protected DmTableRelCriterion(String condition, Object value, int likeType) {
            this.condition = condition;
            if (likeType == 0) {
                this.value = "%" + value;
            }
            else if (likeType == 1) {
                this.value = "%" + value + "%";
            }
            else {
                this.value = value + "%";
            }
            this.typeHandler = null;
            this.singleValue = true;

        }

        protected DmTableRelCriterion(String condition, Object value,
                String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            }
            else {
                this.singleValue = true;
            }
        }

        protected DmTableRelCriterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected DmTableRelCriterion(String condition, Object value,
                Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected DmTableRelCriterion(String condition, Object value,
                Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}